package router

import (
	"github.com/gin-gonic/gin"
	"lin6xcom/src/controller"
	"lin6xcom/src/utils"
)

// 分类相关路由
func categoryRouter(e *gin.Engine) {
	categoryGroup := e.Group("/category")
	{
		categoryGroup.GET("/get", controller.CategoryController{}.GetCategory)
		categoryGroup.GET("/getAll", controller.CategoryController{}.GetAllCategory)
		//需要登录
		categoryGroup.POST("/add", utils.FJwt{}.Getting, controller.CategoryController{}.AddCategory)
		categoryGroup.PUT("/update", utils.FJwt{}.Getting, controller.CategoryController{}.UpdateCategory)
		categoryGroup.DELETE("/delete", utils.FJwt{}.Getting, controller.CategoryController{}.DeleteCategory)
	}
}
